site: maturity pass + amesh-agent binary pipeline - #17
Merged
Conversation
Brings the landpage closer to vite.dev / bun.com maturity and fixes remote-shell docs to match reality. SEO baseline - Add JSON-LD helper (lib/seo.ts) and Organization/SoftwareApplication/ WebSite schema on the homepage, plus BreadcrumbList + TechArticle on every /docs/* and /use-cases/* page. FAQPage schema on /docs/faq. - Fix sitemap: add missing /docs/key-storage, bump lastmod, add all new /docs/* routes, /blog, and new blog posts. Nav + visual polish - Flatten Nav: remove Use Cases dropdown, add flat Docs | Use Cases | Blog | GitHub | Get Started. - Hero: replace v0.3.0 badge with Beta chip (production ready was overclaiming for a 0.3.x product), add Trust strip below hero with @noble/* credits, card lift hover states with shadow, tighter typographic hierarchy. - Fix TableOfContents magic-number margin: responsive calc positioning gated on 2xl breakpoint so it stops overlapping content on 1024-1535px viewports. Docs IA restructure (bun.com-style) - New DocsSidebar with nested sections: Introduction / Getting Started / Guides / Reference / Packages. - Rewrite navigation.ts with hierarchical docSections + cross-section prev/next. - New pages: /docs/introduction, /docs/quickstart, /docs/faq, /docs/troubleshooting, /docs/changelog. - Redesign /docs landing with feature grid (Start here / Guides / Reference cards, Quickstart featured). Blog (maturity signal) - New /blog section with metadata store (lib/blog.ts), landing page with card list, BlogPosting JSON-LD schema. - Two seed posts drawn from existing content: 'Why we built amesh' (essay) and 'Introducing amesh 0.3' (release notes). Remote-shell docs fix - Correct the command: amesh agent start -> amesh-agent agent start (the command lives in @authmesh/agent, not @authmesh/cli). - Drop phantom 'brew install ameshdev/tap/amesh-agent' formula reference and 'amesh-agent-linux-x64.tar.gz' binary download reference — neither exists today. npm install is the only working path until prebuilt agent binaries ship (see companion commit). - Add 'Runtime requirement' amber callout explaining the Bun dependency and the 'bun $(which amesh-agent) agent start' workaround until binaries ship. Lists supported platforms; notes armv7 is unsupported. - New Troubleshooting entry for 'requires Bun runtime for PTY support'. Messaging cleanup (no 'we know better') - Hero chip: Production ready -> Beta. - Comparison table: Vault column -> Secrets Manager. - Remove all specific competitor/company mentions from prose (AWS Secrets Manager, HashiCorp Vault, Doppler, Uber, Samsung, Toyota, Twitch, Ethereum, Signal, Cloudflare). Keep the technical critique of the secrets-manager pattern; drop the name-dropping. Applied across blog post, /docs/introduction, /docs/faq, and /docs hub FAQ card description.
The @authmesh/agent package currently fails to run after 'npm install'
on every platform, not just Raspberry Pi. The agent uses Bun.spawn with
the terminal PTY option (Bun-only), and the runtime guard at
packages/agent/src/commands/agent/start.ts fires under Node.js. Users
have to manually wrap it with 'bun $(which amesh-agent) agent start',
which is a terrible onboarding experience.
This commit ships prebuilt binaries for all four Bun-supported targets
(darwin-arm64, darwin-x64, linux-x64, linux-arm64) so 'npm install' and
'brew install' both produce a working amesh-agent on those platforms.
Linux armv7 (Raspberry Pi 3 and earlier) remains unsupported because
Bun itself does not ship for that architecture.
Compiled binary entry point
- New packages/agent/src/sea.ts mirrors packages/cli/src/sea.ts:
statically imports all commands so oclif's filesystem discovery
doesn't need a real package.json at runtime (Bun compiled binaries
can't read /$bunfs). Adds nested-command dispatch for
'amesh-agent agent start' since the CLI sea.ts only handled
top-level commands.
Build pipeline
- packaging/build-bun.mjs: refactored to a compile() helper invoked
twice, once for amesh (packages/cli/src/sea.ts) and once for
amesh-agent (packages/agent/src/sea.ts). Both binaries land in
packaging/dist/, respecting --target for cross-compilation.
Verified locally: produces dist/amesh and dist/amesh-agent, each
~61MB, --help and nested 'agent start --help' dispatch correctly.
Release workflow
- .github/workflows/release-packages.yml: add bun-linux-arm64 to the
matrix (cross-compiled from ubuntu-latest via Bun's --target flag).
Each tarball already packs everything in packaging/dist/, so both
binaries ship in the same amesh-{version}-{platform}-{arch}.tar.gz
artifact — no new artifact count. Homebrew formula heredoc updated
to include on_linux/on_arm block and install amesh-agent.
Homebrew formula
- packaging/homebrew/amesh.rb: install amesh-agent alongside amesh
(guarded with File.exist? so releases without an agent binary don't
break). Test block asserts both binaries respond to --help.
npm postinstall binary download
- packages/agent/package.json: bin now points at
scripts/launcher.mjs instead of dist/index.js; adds postinstall
running scripts/postinstall.mjs. Includes scripts/ in 'files'.
- New packages/agent/scripts/postinstall.mjs: detects
process.platform + process.arch, maps to the matching GitHub
release tarball, downloads via native fetch (Node 18+), extracts
just the amesh-agent binary into bin/, chmods it 0755. Honors
AMESH_SKIP_POSTINSTALL=1 escape hatch. On unsupported platforms
(e.g. linux-armv7), prints a helpful 'install Bun and use wrapper'
warning and exits 0 so 'npm install' never fails on unsupported
archs — the JS entry + existing Bun guard still work as a fallback.
- New packages/agent/scripts/launcher.mjs: if the prebuilt binary
exists in bin/, spawnSync it with passthrough args and exit with
its status; otherwise fall back to the oclif JS entry which
surfaces the Bun runtime requirement. Same pattern esbuild/swc use.
Per-package README fixes
- packages/agent/README.md: drop phantom Homebrew tap reference,
document the postinstall binary download and the four supported
platforms, explain armv7 limitation.
- packages/cli/README.md: remove incorrect 'amesh agent start' line
(that command lives in @authmesh/agent, not @authmesh/cli) and add
a note pointing to the separate agent package.
Not yet done (follow-up after first tagged release with these
changes)
- Re-add the Homebrew and binary tarball install options to
/docs/remote-shell once binaries are actually in a release.
- Remove the amber 'Runtime requirement' callout added in the
companion commit.
- Verify 'npm install -g @authmesh/agent' on fresh Ubuntu 22.04 x64
and Debian aarch64 VMs.
…arator
The agent package ships with nested commands ('amesh-agent agent start'),
but oclif v4 defaults to colon-only syntax unless topicSeparator is set
explicitly. Without it, 'amesh-agent agent start' under the JS entry
point (dist/index.js, used as the postinstall fallback path) falls back
to oclif's topic help text and never invokes the command — meaning the
Bun runtime guard never fires, and users on unsupported platforms see
topic help instead of the clear 'install Bun and use the wrapper' error.
Adding topicSeparator: ' ' makes oclif treat space-separated args the
same as colon-separated, matching every code path and every doc
reference. Verified in a fresh Debian/Node container:
node scripts/launcher.mjs agent start
-> fires the Bun runtime guard (expected)
node scripts/launcher.mjs agent start --help
-> prints full command help with all flags (not topic help)
The compiled binary path (packages/agent/src/sea.ts) is unaffected —
it has its own explicit nested dispatch and already handles space
syntax. This fix is specifically for the JS fallback path that
triggers when postinstall can't download a binary for the host
architecture (e.g. linux-armv7).
Three internal docs were stale relative to the landpage changes and the
@authmesh/agent package split. Fixed in the same PR because they're
linked from the top-level README and ADRs visible to contributors.
docs/why-amesh.md: genericize company/competitor mentions
- Remove 'Uber, Samsung, Toyota, and Twitch' leak-victim list; replace
with 'real engineers at companies of every size'.
- Remove 'AWS Secrets Manager, HashiCorp Vault, and Doppler' naming;
rewrite the secrets-managers section to critique the pattern (string
still copyable, runtime dependency, self-referential auth) rather
than specific products. Add an acknowledgement that secrets managers
are a genuine improvement over loose .env files — amesh operates at
a different layer.
- Table row 'Vault access, Slack threads' -> 'secrets manager access,
Slack threads'.
Matches the same cleanup already applied to the landpage blog post,
/docs/introduction, /docs/faq, and /docs/+page.svelte.
docs/remote-shell-spec.md: command name matches package split
- 9 references of 'amesh agent start' / 'amesh agent' corrected to
'amesh-agent agent start' / 'amesh-agent agent' since the daemon
now ships in @authmesh/agent, not @authmesh/cli.
- Added a pointer from section 5.1 to ADR-011 explaining the package
split rationale.
docs/architecture-decisions.md: mark ADR-011 partially superseded
- Add a status block at the top of 'ADR-011: Remote shell in the CLI
with explicit shell permission' explaining that the 'one package,
one binary' design was reversed: the daemon is now in @authmesh/agent
exposing amesh-agent, while @authmesh/cli keeps the controller-side
commands. The reason is runtime-dependency: Bun.spawn({ terminal })
is Bun-only, and bundling it with @authmesh/cli forced the entire
controller install to depend on Bun even for users who only wanted
amesh init + amesh.fetch().
- Strike through the 'rejected alternative' bullet that argued against
a separate package (historical record preserved, with an inline
explanation of why it was later reversed).
- The security argument in the ADR body is unchanged — 'amesh grant
--shell' is still the real boundary, not the package boundary.
Preserved as historical records, not touched:
- docs/remote-shell-security-review.md (security review snapshot)
- docs/project-review-2026-04-02.md (project review snapshot)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two linked changes: a major maturity pass on the landing page / docs, and a fix to the broken
amesh-agentinstall experience. Split across two commits so each can be reviewed independently.TableOfContentspositioning, correct the/docs/remote-shellpage (commands + install methods were wrong), genericize company mentions across prose.amesh-agentbinaries for macOS arm64/x64 and Linux x64/arm64, addlinux-arm64to the release matrix, npm postinstall that auto-downloads the right binary per platform, Homebrew formula installs both binaries from a single tap. Fixes the "install fails on every platform, not just Raspberry Pi" issue.What was broken
/docs/remote-shellwas lying. It showedamesh agent start(command doesn't exist — it'samesh-agent agent startfrom a separate package), referenced a Homebrew tap formula that doesn't exist (brew install ameshdev/tap/amesh-agent), and advertised a binary download (amesh-agent-linux-x64.tar.gz) that was never built.npm install -g @authmesh/agent && amesh-agent agent startfailed on every platform. The agent usesBun.spawn({ terminal })for PTY (Bun-only); the runtime guard atcommands/agent/start.ts:25-32errors out under Node.js; the published package has#!/usr/bin/env node. Users had to manually runbun $(which amesh-agent) agent start— not just on Raspberry Pi.Key changes by area
Landing page & docs (commit 1, 28 files)
landpage/src/lib/seo.ts(new) — JSON-LD helpers:jsonLdScript,graph,breadcrumbList,techArticle,blogPostinglandpage/src/lib/blog.ts(new) — blog post metadata storelandpage/src/lib/navigation.ts— hierarchicaldocSections+ cross-sectiongetDocNavlandpage/src/lib/components/DocsSidebar.svelte— renders nested sections dynamicallylandpage/src/lib/components/Nav.svelte— flattened:Docs | Use Cases | Blog | GitHub | Get Startedlandpage/src/lib/components/TableOfContents.svelte— responsive calc positioning, 2xl breakpointlandpage/src/routes/+page.svelte— Beta chip, trust strip, card lift hovers, tightened h1 typography, comparison-table column renamed toSecrets Managerlandpage/src/routes/docs/+page.svelte— bun.com-style feature grid with Start here / Guides / Reference sectionslandpage/src/routes/docs/{introduction,quickstart,faq,troubleshooting,changelog}/+page.svelte(5 new)landpage/src/routes/blog/+page.svelte+ 2 seed postslandpage/src/routes/docs/remote-shell/+page.svelte— fixed commands, dropped phantom install options, added amber "Runtime requirement" calloutlandpage/static/sitemap.xml— all new routes + missing/docs/key-storageAgent binary pipeline (commit 2, 9 files)
packages/agent/src/sea.ts(new) — compiled-binary entry point mirroringpackages/cli/src/sea.ts, with nested-command dispatch foramesh-agent agent startpackages/agent/scripts/postinstall.mjs(new) — downloads the prebuilt binary for the host platform from the matching GitHub release; exits 0 on unsupported platforms with a helpful messagepackages/agent/scripts/launcher.mjs(new) — bin entry that execs the prebuilt binary if present, falls back to the JS oclif entry otherwisepackages/agent/package.json— bin points at launcher; adds postinstallpackaging/build-bun.mjs— compiles bothameshandamesh-agentfrom a shared helper.github/workflows/release-packages.yml— addsbun-linux-arm64; Homebrew heredoc installsamesh-agentpackaging/homebrew/amesh.rb— installsamesh-agentalongsideameshpackages/{agent,cli}/README.md— fix phantom Homebrew references and theamesh agent startcommand listingTest plan
Local verification (done)
bun run buildacross monorepo — cleanbun run lint— cleanbun run test— 12 of 13 packages pass; 3 macOS Keychain tests (packages/keystore/src/__tests__/macos-keychain.test.ts) fail identically on cleanmaintoo — pre-existing, environment-specific (likely unsigned dev binary vs Keychain sandbox), not caused by this branchbun run format:check— cleanbun packaging/build-bun.mjs— produces bothdist/ameshanddist/amesh-agent, both ~61MB, both--versionand--helpwork, nestedamesh-agent agent start --helpdispatches correctly/docs/quickstart,/docs/faq,/docs/changelog,/blog,/docs/remote-shell, and the comparison tableCI
Follow-up required before merging into a release
This PR ships the code for prebuilt binaries but cannot be fully verified end-to-end until a tagged release runs the updated
release-packages.yml. Before publishing the next version:v0.3.4orv0.4.0), confirmrelease-packages.ymlproduces all 4 tarballs (darwin-arm64, darwin-x64, linux-x64, linux-arm64), each containing bothameshandamesh-agentnpm install -g @authmesh/agent→ postinstall downloadsamesh-linux-x64.tar.gz→amesh-agent agent startruns without anybunwrapper, PTY worksamesh-linux-arm64.tar.gzbrew install ameshdev/tap/amesh→which amesh-agentreturns a real path,amesh-agent agent startruns/docs/remote-shelland re-add the Homebrew + binary-tarball install tabsDeliberate non-goals
node-ptyrewrite — would unlock Raspberry Pi 3 / armv7 but adds native module dependency; only needed if armv7 demand appears